<?php

class NewsletterRecord extends TActiveRecord
{
	const TABLE='tbl_newsletter';

	public $UserID;
	public $UserName;	
	public $Email;
	public $Status=0;	
	public $CreateDate=0;
	public $ModifyDate=0;
	
	public static $COLUMN_MAPPING=array
	(
		'user_id'=>'UserID',
		'user_name'=>'UserName',
		'user_email'=>'Email',
		'status'=>'Status',
		'c_date'=>'CreateDate',
		'm_date'=>'ModifyDate'
	);

	public static function finder($className=__CLASS__)
	{
		return parent::finder($className);
	}
	
	public function save()
	{
		parent::save();
	}
	
	public function getAllItems()
	{
		$criteria = new TActiveRecordCriteria;
		//$criteria->Condition = "user_email > 0";
		return self::finder()->findAll($criteria);
	}
}
?>